//
//  NetWorksTools.h
//  GasCome
//
//  Created by zfc on 2019/11/1.
//  Copyright © 2019年 depelec. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSInteger, HTTPMethod) {
    POST,
    GET,
    DELETE,
    PUT,
};



NS_ASSUME_NONNULL_BEGIN

@interface NetWorksTools : NSObject

@property (nonatomic, assign) BOOL hasRefresh;  //判断是否刷新


+(instancetype)shared;

+ (void)configHttpHeader:(NSDictionary *)httpHeader;

- (void) requestWithMethod:(NSInteger)method url:(NSString *)url params:(NSDictionary * __nullable)params successBlock:(void (^)(NSDictionary *response))successBlock failureBlock:(void (^)(NSError *error))failureBlock;

- (void) requestWithNotTokenMethod:(NSInteger)method url:(NSString *)url params:(NSDictionary * __nullable)params successBlock:(void (^)(NSDictionary *response))successBlock failureBlock:(void (^)(NSError *error))failureBlock;

@end

NS_ASSUME_NONNULL_END
